The present invention relates to a method and system for detecting a road area and in particular to a system for recognizing the environment around a vehicle by an image processing.
One of prior art road area detecting systems for recognizing the environment around a vehicle by an image processing is disclosed in, for example, Japanese Patent Kokai Publication No. JP-A-3-118615. The publication proposes an environment recognizing apparatus in a movable vehicle, to which an image of an external environment is input for recognizing the environment. The apparatus comprises an image inputting means for inputting an image in front of the vehicle as serial image signals by scanning the scene of the image in an advancing direction of the vehicle as a substantial main scanning direction of a raster scanning type, and means for detecting the road edge based upon the detection of a change in contrast (or concentration) with respect to the serial image signals.
The configuration of the apparatus is shown in FIG. 5. The environment recognizing apparatus comprises an image input device 501, an initial value memory 502, a comparator 503 and a counter 504.
The conventional environment recognizing apparatus as shown in FIG. 5 operates as follows:
The brightness at a point in a road area in the lower portion of a road image which is input from the image input device 501 is stored in the initial value memory 502 as an initial value. Then, the brightness in another point in the road image is compared with the initial value by the comparator 503. A point having a difference which is not higher than a threshold value is regarded as a point within the road area and is output to the counter 504.
However, the prior art method which has been described with reference to FIG. 5 has a problem in which the accuracy of detection in the upper portion of the road area is lowered.
The reason resides in that the brightness in the road area is actually changed with the distance from the movable vehicle, that is the vertical coordinate value in the image although the brightness in the road area is assumed to be constant in the prior art method.
Therefore, the present invention has been achieved in view of the above-mentioned problem. It is an object to provide a method and system for detecting the road area which is capable of detecting the road area without lowering the accuracy over the entire of the road area.
In order to achieve the above-mentioned object, there is provided a system for detecting a road area according to claim 1. The system comprises means for inputting an image, means for calculating statistic for each horizontal line, means for fitting said statistic to a function, means for processing threshold value of the road image (termed as xe2x80x9cthreshold value-processing meansxe2x80x9d), and means for detecting the road area, whereby detection of a road area which tracks the changes in the vertical coordinate value of the brightness in the road area is conducted based upon the statistic which is calculated for each line by the statistic calculating means.
The means for threshold value-processing of road image includes means for modifying the image based upon the position in the road image prior to the threshold value-processing. The means for threshold value-processing of road image includes means for presetting a threshold value based upon statistic of the image which has not been subjected to the threshold value-processing.
The means for calculating the statistic uses brightness value at a peak in a histogram for each horizontal line as the statistic.
The function fitting means uses an inverse proportional function relating to the vertical coordinate of the image as a function.
Spatial differentiation is effected on an image which has not been subjected to the threshold value-processing and its statistic is used in said means for presetting the threshold value based upon statistic of an image which has not been subjected to the threshold value-processing.
The spatial differentiation is effected on an image which has not been subjected to the threshold value-processing and a threshold value is preset as a linear function of an average value of pixel values in said means for presetting the threshold value based upon statistic of an image which has not been subjected to the threshold value-processing.
According to another aspect of the present invention, there is provided a method of detecting a road area. The method is characterized in that detection of a road area which tracks changes in the vertical coordinate value of the brightness in the road area is conducted based upon statistic which is calculated for each line in a given area in a road image which is input from image input means.
The method of detecting a road area comprises:
(a) calculating statistic of each horizontal line of a road image which is input from image input means,
(b) fitting the statistic of each horizontal line to a predetermined model function relating to the vertical coordinate of the image,
(c) approximating the statistic of each horizontal line by using said function and processing a threshold value of said road image based upon the difference between its characteristic value and a value of the model function on the vertical coordinate in each pixel of said road image, and
(d) detecting a road area from the road image which has been processed with said threshold value.
In a further aspect, the method of detecting a road area comprises the steps of:
(a) inputting a road image from image input means,
(b) calculating statistic of the brightness value as a characteristic value for each horizontal line in a predetermined area such as lower area in which the road area occupies a predominant area in the image,
(c) fitting the statistic of each horizontal line to a predetermined model function on the vertical coordinate of the road image to approximate the characteristic value of each horizontal line of the road image using this function,
(d) calculating the difference between the characteristic value and the value of the model function on said vertical coordinate,
(e) modifying the difference between the characteristic value and the value of the model function based upon the position in the image so that value of the difference becomes lower for a pixel having a higher probability that the pixel is in the road area,
(f) calculating the statistic of the modified difference over the entire of said road image,
(g) presetting a threshold value for said difference value based upon said statistic,
(h) converting the difference between the characteristic value and the function value in each pixel into two-valued variable, and
(i) cutting out an area which is in the lower portion of the road image as a road area based upon the difference value which is represented by the two-valued variable.
According to a still further aspect of the present invention, there is provided in a system for computer value the environment around a vehicle with an image, a computer usable medium storing thereon a program for functioning the system. The system is characterized by:
(a) means for calculating statistic for each horizontal line of a road image which is input from image input means,
(b) means for fitting said statistic to a function,
(c) means for processing a threshold value of said road image by using said function value, and
(d) means for detecting a road area from the road image which has been processed with said threshold value.
More specifically, there is provided a medium storing thereon a program for executing in a computer the steps of:
(a) inputting a road image from image input means,
(b) calculating statistic of the brightness value as a characteristic value for each horizontal line in a predetermined area such as lower area in which the road area occupies a predominant area in the image,
(c) fitting the statistic of each horizontal line to a predetermined model function in the vertical coordinate of the road image to approximate the characteristic value of each horizontal line of the road image using this function,
(d) calculating the difference between the characteristic value and value of the model function in said vertical coordinate,
(e) modifying the difference between the characteristic value and the value of the model function based upon the position in the image so that value of the difference becomes lower for a pixel having a higher probability that the pixel is in the road area,
(f) calculating the statistic of the modified difference over the entire of said road image,
(g) presetting a threshold value for said difference value based upon said statistic,
(h) converting the difference between the characteristic value and the function value in each pixel into two-valued variable, and
(i) cutting out an area which is in a lower portion of the road image as the road area based upon the difference value which is represented by the two-valued variable.